package com.cipe.cmrs.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

/**
 * @author Incepio
 *
 */
@MappedSuperclass
public class BaseAuditEntity extends BaseEntity {

	private static final long	serialVersionUID	= 2289496708923771713L;
    @ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "createdby")
	private User				createdBy;
	@Column(name = "createdate")
	private Date				creationDate;
    @ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "lastupdatedby")
	private User				updatedBy;
	@Column(name = "lastupdated")
	private Date				updationDate;

	public User getCreatedBy() {
		return createdBy;
	}

	public Date getCreationDate() {
		return creationDate;
	}

	public User getUpdatedBy() {
		return updatedBy;
	}

	public Date getUpdationDate() {
		return updationDate;
	}

	public void setCreatedBy(User createdBy) {
		this.createdBy = createdBy;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public void setUpdatedBy(User updatedBy) {
		this.updatedBy = updatedBy;
	}

	public void setUpdationDate(Date updationDate) {
		this.updationDate = updationDate;
	}
}
